package com.mccrea.pattern.visitor;

import java.util.Random;

/**
 * @Classname Staff
 * @Description 员工基类
 * @Date 2021/5/20 0020 14:10
 * @Created by Mccrea_Gao
 */
public abstract class Staff {
    // 名称
    public String name;
    // 员工KPI
    public int kpi;

    public Staff(String name) {
        this.name = name;
        kpi = new Random().nextInt(10);
    }

    // 核心方法，接受Visitor访问
    public abstract void accept(Visitor visitor);
}
